<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/4/21
  Time: 12:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!-- Horizontal Form -->
<div id="mailboxlist" style="display: block;">
    <div class="box-header with-border">
        <h3 class="box-title">草稿箱</h3>

        <div class="box-tools pull-right">
            <div class="has-feedback">
                <input type="text" class="form-control input-sm"
                       placeholder="Search Mail"> <span
                    class="glyphicon glyphicon-search form-control-feedback"></span>
            </div>
        </div>
        <!-- /.box-tools -->
    </div>
    <!-- /.box-header -->
    <div class="box-body no-padding">
        <div class="mailbox-controls">
            <!-- Check all button -->
            <button type="button"
                    class="btn btn-default btn-sm checkbox-toggle " id="checkall">
                <i class="fa fa-square-o"></i>
                <%--<i class="fa fa-check-square-o"></i>--%>
            </button>
            <div class="btn-group">
                <button type="button" class="btn btn-default btn-sm" id="markIsRead">
                    <i class="fa fa-envelope-o"></i>
                </button>
                <button type="button" class="btn btn-default btn-sm">
                    <i class="fa fa-reply"></i>
                </button>
                <button type="button" class="btn btn-default btn-sm">
                    <i class="fa fa-share"></i>
                </button>
            </div>
            <!-- /.btn-group -->
            <button type="button" class="btn btn-default btn-sm">
                <i class="fa fa-recycle" id="deleteMessage"></i>
            </button>

            <!-- /.pull-right -->
        </div>

        <!-- table -->
        <div class="table-responsive mailbox-messages">
            <table class="table table-hover table-striped">
                <tbody id="messagelist">
                <c:forEach items="${drafts }" var="draft">
                    <tr id="${draft.id}">
                        <td>
                            <input type="checkbox" class="checkboxitem">

                        </td>

                        <td class="mailbox-name"><a
                                href="read-mail.html">${draft.to }</a></td>
                        <td class="mailbox-subject"><a href="${pageContext.request.contextPath}/mail/showDraft.shtml?id=${draft.id}" style="color:black"><b>${draft.subject }</b>
                        </a></td>
                        <td class="mailbox-attachment"></td>
                        <td class="mailbox-date" id="sendtime">${draft.saveTime }</td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
            <!-- /.table -->
        </div>
        <!-- /.mail-box-messages -->
    </div>
    <!-- /.box-body -->
    <div class="box-footer no-padding">
        <div class="mailbox-controls">
            <!-- Check all button -->

            <div class="pull-right">
                ${currentPage.page}/${currentPage.totalPage}
                <div class="btn-group">
                    <button type="button" class="btn btn-default btn-sm" id="prevBtn">
                        <i class="fa fa-chevron-left"></i>
                    </button>
                    <button type="button" class="btn btn-default btn-sm" id="nextBtn">
                        <i class="fa fa-chevron-right"></i>
                    </button>
                </div>
                <!-- /.btn-group -->
            </div>
            <!-- /.pull-right -->
        </div>
    </div>
</div>